﻿using Abp.Domain.Entities;
using Abp.Domain.Entities.Auditing;
using App.Authorization.Users;
using App.BaseObject;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace App.Authorization.Roles
{
    /// <summary>
    /// 角色
    /// </summary>
    public class Role : AuditedEntity, IMayHaveTenant
    {
        public const string HostDefaultRoleName = "Administrator";

        [StringLength(ColumnSetting.Short)]
        public virtual string RoleName { get; set; }
        [StringLength(ColumnSetting.Remark)]
        public virtual string RoleDesc { get; set; }
        [ForeignKey("RoleId")]
        public virtual ICollection<RolePermission> Permissions { get; set; }

        public virtual int? TenantId { get; set; }
    }
}
